<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Back Color</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style type="text/css">
.D{
	cursor:hand;
	cursor:pointer;
}
button {
	border:1px solid #999;
	margin:0px;
	padding:0px;
	margin-top:2px;
	margin-left:2px;
	width:20px;
	height:20px;
	cursor:hand;
	cursor:pointer;
}
.D1{
	background:#FF9999;
}
.D2{
	background:#FFFF80;
}
.D3{
	background:#80FF80;
}
.D4{
	background:#80FFFF;
}
.D5{
	background:#0080FF;
}
.D6{
	background:#FF80C0;
}
.D7{
	background:#FF0000;
}
.D8{
	background:#CCCC66;
}
.D9{
	background:#00FF40;
}
.D10{
	background:#0099CC;
}
.D11{
	background:#9999CC;
}
.D12{
	background:#FF00FF;
}
.D13{
	background:#CC3333;
}
.D14{
	background:#FF9933;
}
.D15{
	background:#009999;
}
.D16{
	background:#006699;
}
.D17{
	background:#9999FF;
}
.D18{
	background:#990033;
}
.D19{
	background:#990000;
}
.D20{
	background:#FF9900;
}
.D21{
	background:#009900;
}
.D22{
	background:#0000FF;
}
.D23{
	background:#0000CC;
}
.D24{
	background:#990099;
}
.D25{
	background:#660000;
}
.D26{
	background:#006666;
}
.D27{
	background:#999900;
}
.D28{
	background:#660099;
}
.D29{
	background:#339999;
}
.D30{
	background:#66CCCC;
}
.D31{
	background:#000000;
}
.D32{
	background:#494949;
}
.D33{
	background:#767676;
}
.D34{
	background:#A6A6A6;
}
.D35{
	background:#C7C7C7;
}
.D36{
	background:#FFFFFF;
}
body{
	overflow:hidden;
	margin:0px;
	padding:0px;
	padding-top:1px;
}
</style>
<script type="text/javascript">
	function returnColor(_oObj){
		return _oObj.currentStyle ? _oObj.currentStyle['backgroundColor'] : window.getComputedStyle(_oObj, "")['backgroundColor'];
	}
	function setColor(_sCss, _sSort, _sColor){
		if(window.Event){
			var oRTE = opener.getFrameNode(opener.sRTE);
			}
		else {
			var oRTE = dialogArguments.getFrameNode(dialogArguments.sRTE);
		}
		oRTE.focus();
		oRTE.document.execCommand(_sSort, false, _sColor);
		oRTE.focus();
		window.close();
	}
	function reg2color(_sColor){
		if(_sColor.indexOf('rgb') > -1){
			aColor = _sColor.replace("(","").replace(")","").replace("rgb","").split(", ");
			aColor[0] = (Math.abs(aColor[0])).toString(16);
			aColor[0] += aColor[0].length == 1 ? "0" : "";
			aColor[1] = (Math.abs(aColor[1])).toString(16);
			aColor[1] += aColor[1].length == 1 ? "1" : "";
			aColor[2] = (Math.abs(aColor[2])).toString(16);
			aColor[2] += aColor[2].length == 1 ? "2" : "";
			return "#" + aColor.join('');
		}else{
			return _sColor;
		}
	}
</script>
</HEAD>
<BODY>
<script language="JavaScript">
<!--
var k = 1;
for(var i = 0; i < 6; i ++) {
	for(var j = 0; j < 6; j++) {
		document.write('<button onclick="setColor(this.className, \'BackColor\', reg2color(returnColor(this)))" class="D' + k + '"></button>');
		k ++;
	}
	document.write('<br />');
}
//-->
</script>
</BODY>
</HTML>
